var e = require;
var t = module;
var o = exports;
var n,
    i = o,
    a =
        ((n = function (e, t) {
            return (n =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
                })(e, t);
        }),
        function (e, t) {
            function o() {
                this.constructor = e;
            }
            n(e, t), (e.prototype = null === t ? Object.create(t) : ((o.prototype = t.prototype), new o()));
        });
Object.defineProperty(i, "__esModule", {value: !0});
var r = e("Util"),
    s = (e("LoginProxy"), e("RankRequest"), e("RankVO")),
    c = (function (e) {
        function t() {
            return e.call(this, t.NAME, new s.default()) || this;
        }
        return (
            a(t, e),
            (t.prototype.initRank = function () {
                switch (
                    ((this.rankVO.gameCode = 10087),
                    (this.rankVO.platformCode = 3),
                    (this.rankVO.systemCode = 1),
                    (this.rankVO.serverId = 1),
                    ad.curr_platform)
                ) {
                    case window.ad.Platform.QQ:
                        (this.rankVO.rankType = 2), (this.rankVO.platformCode = 2), (this.rankVO.serverId = 0);
                        break;
                    case window.ad.Platform.WECHAT:
                        (this.rankVO.rankType = 2), (this.rankVO.platformCode = 3), (this.rankVO.serverId = 1);
                        break;
                    case window.ad.Platform.OPPO:
                        (this.rankVO.rankType = 2), (this.rankVO.platformCode = 2), (this.rankVO.serverId = 0);
                        break;
                    case window.ad.Platform.TOU_TIAO:
                        (this.rankVO.rankType = 3),
                            (this.rankVO.platformCode = 1),
                            (this.rankVO.systemCode = 1),
                            (this.rankVO.serverId = 0);
                        break;
                    case window.ad.Platform.VIVO:
                    default:
                        (this.rankVO.rankType = 2), (this.rankVO.platformCode = 2), (this.rankVO.serverId = 0);
                }
                -1 !== this.rankVO.rankType && r.default.getItem("rankID_rankTypeModelTimeLimit", "-404");
            }),
            (t.prototype.requestRankList = function () {
                var e = this;
                cc.resources.load("configs/rank2", cc.JsonAsset, function (o, n) {
                    if (o) cc.error(o.message || o);
                    else {
                        var i = n.json;
                        (e.rankVO.rankList = i), e.sendNotification(t.RANK_LIST_UPDATR);
                    }
                });
            }),
            (t.prototype.requestSelfRank = function () {}),
            (t.prototype.reportRankData = function () {}),
            Object.defineProperty(t.prototype, "rankVO", {
                get: function () {
                    return this.data;
                },
                enumerable: !1,
                configurable: !0
            }),
            (t.NAME = "RankProxy2"),
            (t.RANK_INIT_SUCCESS = "RANK_INIT_SUCCESS"),
            (t.RANK_LIST_UPDATR = "RANK_LIST_UPDATR"),
            t
        );
    })(puremvc.Proxy);
i.default = c;
